package com.heatup.apt.common.constants;

import com.heatup.apt.common.util.StringUtil;

/**
 * 课程相关常量
 * <P>File name : CourseConstants.java </P>
 * <P>Author : fangxiaowen </P> 
 * <P>Date : 2016年8月23日 </P>
 */
public class CourseConstants {
	
	/** 是VIP独享课程 */
	public static final int IS_VIP_USED = 1;// 是VIP独享课程
	
	/** 不是VIP独享课程 */
	public static final int NO_VIP_USED = 0; //不是VIP独享课程
	
	public enum CourseStatus {
		sys_create(1,"1","系统录入"),
		online(2,"2","已上线"),
		inserting_winding(3,"3","已下线"),
		deleted(4,"4","已删除");
		
		private int index;
		private String status;
		private String title;
		
		CourseStatus(int index,String status,String title){
			this.index = index;
			this.status = status;
			this.title = title;
	    }
		
		public static CourseStatus getCourseStatus(String status){
			if(StringUtil.isEmpty(status))
				return null;
			for(CourseStatus courseStatus :CourseStatus.values()){
				if(StringUtil.isEquals(courseStatus.getStatus(), status)){
					return courseStatus;
				}
			}
			return null;
		}

		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		public String getStatus() {
			return status;
		}
		public void setStatus(String status) {
			this.status = status;
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
	}
	
	
	public enum CourseType {
		team_course(1,"1","团购"), 
		private_course(2,"2","私教"),
		fun_camp(3,"3","檬营"),
		physical_coupon(9,"9","体测"),
		private_physical(10,"10","体验"),
		private_bespeak(11,"11","咨询");
		private int index;
		private String type;
		private String title;
		
		CourseType(int index,String type,String title){
			this.index = index;
			this.type = type;
			this.title = title;
		}
		
		public static CourseType getCourseType(String type){
			if(StringUtil.isEmpty(type))
				return null;
			for(CourseType courseType :CourseType.values()){
				if(StringUtil.isEquals(courseType.getType(), type)){
					return courseType;
				}
			}
			return null;
		}

		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}

		public String getType() {
			return type;
		}

		public void setType(String type) {
			this.type = type;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}
		
	}

}
